package data;

/**
 * Class Resource
 * 
 * Implements a certain resource of a village.
 * 
 * @author Stijn Verslycken, Jonas Van Den Bossche
 * @date 2007-2008
 */
public class Resource {

    private int villageId;
    private String resourceTypeName;
    private int amount;
    private String imageUrl;

    /**
     * Constructor with all parameters.
     * @param resourceTypeName 
     * @param amount
     * @param villageId
     * @param imageUrl 
     */
    public Resource(int villageId, String resourceTypeName, int amount, String imageUrl) {
        this.setVillageId(villageId);
        this.setResourceTypeName(resourceTypeName);
        this.setAmount(amount);
        this.setImageUrl(imageUrl);
    }

    /**
     * Constructor with all parameters but imageUrl
     * @param amount
     * @param resourceTypeName 
     * @param villageId
     */
    public Resource(int villageId, String resourceTypeName, int amount) {
        this(villageId, resourceTypeName, amount, null);
    }


    public int getAmount() {
        return amount;
    }

    public synchronized void setAmount(int amount) {
        this.amount = amount;
    }

    public String getResourceTypeName() {
        return resourceTypeName;
    }

    public void setResourceTypeName(String resourceTypeName) {
        this.resourceTypeName = resourceTypeName;
    }

    public int getVillageId() {
        return villageId;
    }

    public void setVillageId(int vilageId) {
        this.villageId = vilageId;
    }

    public String getImageUrl() {
        return this.imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }
}
